<?php

namespace app\index\controller;

use app\common\Model\Member;
use controller\BasicApi;


/**
 * 会员控制器
 * @author Vilson
 */
class MemberController extends BasicApi{


    public
    function index(){
        $this->success('success MemberController');
    }

    public
    function login_by_alipaycode(){
        $aut_code = input('auth_code', '');
        if(empty($aut_code)){
            $this->return_json(4001, '缺少参数：auth_code.');
        }
        $this->return_json(Member::login_by_alipaycode($aut_code));
    }

    public
    function get_member_info(){
        $this->return_json(2000, 'success', Member::get_login_member_info());
    }


}
